<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Overflow Align Demo</title>
    <style>
        body {
            margin: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            height: 100vh;
        }
        .container {
            display: flex;
            overflow-x: scroll;
            /*scroll-snap-type: x mandatory;*/
            scroll-snap-type: x proximity;
            width: 1200px;
            border: 2px solid #ccc;
            border-radius: 10px;
            background-color: #fff;

            /*scroll-padding-left: 100px;*/
        }

        .item {
            min-width: 80%;
            scroll-snap-align: center;


            display: flex;
            justify-content: center;
            align-items: center;

            font-size: 2em;
            color: #fff;
            height: 300px;
            margin: 10px;
            border-radius: 10px;

            /*scroll-margin-left: 100px;*/
        }

        .item:nth-child(odd) {
            background-color: #007bff;
        }
        .item:nth-child(even) {
            background-color: #28a745;
        }
    </style>
</head>
<body>
   <div class="container">
       <div class="item">Item 1</div>
       <div class="item">Item 2</div>
       <div class="item">Item 3</div>
       <div class="item">Item 4</div>
       <div class="item">Item 5</div>
   </div>
</body>
</html>
